Method for producing an oil well

ABSTRACT

This disclosure addresses the vibration problems that occur during drilling operations. Due to the rotational motion effected on the drill string while drilling, vibrations occur, and when these vibrations become excessive, the drill string may oscillate in a manner that could damage the pipes and damage other tools attached to the drill string. Machine learning is used to identify the vibration prone zones and provide recommendations to the driller to change the operating weight on bit (WOB) and rotation speed (RPM) to achieve drilling efficiency while reducing the possibility of damages downhole.

TECHNICAL FIELD

The present disclosure relates to the field drilling. In particular, thepresent disclosure relates to drilling parameters and their effect ondrill string vibrations.

BACKGROUND

To achieve improved drilling efficiency and better productivity of thedriller, there is a need for real-time optimization of drillingparameters during drilling operations through each formation in order tooptimize weight on bit and bit rotation speed to increase drilling rateas well as reduce the drilling cost. The driller only sees the surfacedata but there is usually a deviation in the downhole drillingparameters. The driller needs to make better decisions as he manipulatesthe drilling variables to improve drilling and deal with various issuesthat may arise during drilling operations.

The drilling data collected during drilling include weight on bit (WOB),rotary speed (RPM), pump parameters (SPM), depth, inclination, azimuthand rate of penetration (ROP). These parameters have a significantimpact on the entire optimization process of the WOB and RPM. Thesuccess of drilling optimization is closely related with the quality ofthe recorded drilling data. However, the driller has to make thoseimportant decisions in real time when drilling problems arise.

Several methods have been used to optimize the drilling parameters. In1975, Tansev explained how to improve drilling performance. His methodinvolves the interaction of raw data, regression and an optimizationtechnique in order to predict ROP and the life of the bit (Tansev 1975).Karlsson et al. in 1985, observed the use of a BHA design that includeda navigation sub. They noticed that the tool allowed the driller toalways know the direction of the well and make required trajectorychanges while drilling (Karlsson et al. 1985). In 1997, Kamata et al.explained a drill-bit seismic technique which provides importantsubsurface structure information by using acoustic energy radiatedduring drilling operations. Sensors, placed at the top of drill string,were used to record the information. They achieved drilling optimizationfrom the information gathered thereby improving safety records andsaving cost (Kamata et al. 1997). Paes et al in 2005, focused on the useof sensors for pressure-while-drilling (PWD) and vibration sensors toreduce the drilling cost, non-productive time (NPT), and improvedrilling effectiveness without adding more cost to the cost of theroutine measurement while drilling (Paes et al 2005). Elshafei et al in2015 determined the right combination of drilling parameters to reducedrilling time and minimize deviation from planned drilling path byinputting control commands on angular velocity and torque for a quad bitdrilling system (Elshafei et al 2015). In 2017, Torres-Cabrera et alobserved the difficulty in predicting BHA behaviour which leads to lowROP, unnecessary tripping, and occasionally lost pipe in hole. Theyaddressed the issues through a series of drilling improvements based onreal-time and post-well analyses (Torres-Cabrera et al 2017).

Another method that can be applied to optimize drilling parameters is“machine learning.” Machine learning isn't new; it has been around atleast since the 1970s, when the first related algorithms appeared. Thegeneral idea behind most machine learning is that a computer learns toperform a task by studying a training set of examples. The computer (orsystem of distributed or embedded computers and controllers) thenperforms the same task with data it hasn't encountered before (Louridaset al 2016). Machine learning has been applied to other aspects in theoil industry. Zhang et al in 1991, applied machine learning to rockmechanics and observed that all of the factors governing the rock massbehaviors could be considered as input variables to predict the varyingrock behaviors. They made these observations without limiting the amountof input variables that could be used (Zhang et al 1991). Alvarado et alin 2002 used machine learning in their aim to adapt EOR/IOR (enhancedoil recovery/improved oil recovery) technologies to rejuvenate a largenumber of the mature fields in Venezuela. They used machine learningalgorithms to draw rules for screening (Alvarado et al 2002). In 2016,Cao et al used machine learning algorithms to predict production forseveral wells using pressure and production data, geological maps, andconstraints during operations. They used a well-known machine learningmethod—Artificial Neural Network (ANN). Without assuming a prearrangedmodel, ANN learns from large volume of data points and can change basedon the flexibility of the data available (Cao et al 2016). In 2017,Bangert proposed the use of machine learning in order to conduct smartcondition monitoring. He realized that his proposed method was moresuccessful than standard condition monitoring thus preventing falsealarms and always alarming unhealthy states of plants or equipment(Bangert et al 2017).

Frequent vibrations of the drill string may lead to poor drillingperformance and non-productive time. The concerns arising from drillingvibration are: wasted energy input, low ROP, lengthy drilling time,spoilt bit, damage to the steerable motor leading to unintended trips,damaged Measurement-While-Drilling (MWD)/Logging-While-Drilling (LWD)tools causing lost data, increased fatigue in the drill string, highercaving due to borehole wall damage, discrepancy in data due to meddlingwith downhole tool telemetry during vibrations, increased cost of rigequipment repairs and increased downtime.

Two kinds of vibration are of significant concern. First is Stick-Slip.In this case, the bit periodically stops rotating in a torque up momentthen spins freely, this goes on through a non-uniform rotation of thedrill string. During stick slip, the downhole RPM can be 3× to 15× theaverage surface RPM. The consequences of Stick-slip are bit damage,lower ROP, connection over-torque, back-off and drill string twist-offs.Stick slip occurrence also leads to wear on bit gauge and stabilizer aswell as interruption in mud pulse telemetry.

The second vibration type is drill string whirling. The bulk of drillstring whirling happens in the BHA. During whirling, parts of the BHAface lateral displacements which generate bending stresses and lateralshocks when the BHA contacts the borehole wall (JPT Staff 1998). Havingthe drill string moving around the wellbore and not rotating about itscenterline is the whirling phenomenon. Three types of whirling canoccur; forward whirling is a scenario where the drill string is rotatingaround the wellbore in the same direction with its rotation around itsown centerline; backward whirling is a situation where the drill stringis rotating around the wellbore in a direction opposite the direction ofits rotation around its own centerline. Chaotic whirling occurs wherethe bits moves in a zig-zag manner with no consistent direction.Whirling creates an over gauge hole reinforcing the tendency for the bitand BHA to whirl.

The driller has to constantly manipulate available parameters tomitigate vibration problems. A driller's dilemma emerges when increasingthe WOB induces stick-slip whereas increasing the RPM induces whirl.Keeping both WOB and RPM low reduces vibration levels but it negativelyaffects ROP. As a result, the drilling operation either suffers low ROPor experiences higher ROP but with severe vibrations (Wu et al 2010).

Therefore, improvements in determining optimized parameters for drillingare desirable.

SUMMARY

In a first aspect, the present disclosure provides a method forproducing an oil well. The method comprises: drilling into the Earth,the drilling being effected by a drill string, the drill string having adrill bit; obtaining real-time data from the drill string, the real-timedata comprising, measured depth, drilling time, drill bit depth, weighton drill bit (WOB) data, revolution per minute (RPM) data, torque (TOR)data and rate of penetration (ROP) data; in accordance with thereal-time data and in accordance with pre-determined rules, obtaining adrill string data classification scheme, which defines an optimumdrilling parameter zone; performing a principal component analysis (PCA)of the real-time data, to obtain a set of principle componentsassociated to the real-time data; selecting a subset of the set ofprinciple components; in accordance with the subset of principlescomponents, performing an inverse of the PCA, to obtain modified data;classifying the modified data in accordance with the drill string dataclassification scheme, to obtain classified modified data; comparing theclassified modified data to the optimum drilling parameter zone, toobtain a comparison result; and adjusting at least one of the WOB andthe RPM in accordance with the comparison result.

Other aspects and features of the present disclosure will becomeapparent to those ordinarily skilled in the art upon review of thefollowing description of specific embodiments in conjunction with theaccompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows prior art examples of machine learning methods.

FIG. 2 shows an example of a prior art optimum Zone Chart.

FIG. 3A shows a block diagram representation of an embodiment of amethod in accordance with the present disclosure.

FIG. 3B shows a flowchart of an embodiment of a method in accordancewith the present disclosure.

FIG. 3C shows an embodiment of a classification tree in accordance withan embodiment of the present disclosure.

FIG. 4 shows an example of an operational process to determine the upperlimit of RPM, in accordance with the present disclosure.

FIG. 5 shows an example of how change in ROP and change in time versustime plot might to look like.

FIG. 6 shows the ideal position the upper and lower limits of WOB andRPM in the optimum zone plot, in accordance with an embodiment of thepresent disclosure.

FIG. 7 shows the plotting of principal components on data set on the X-Ycoordinate system.

FIG. 8 shows the effect of dimension reduction using PrincipalComponents Analysis

FIGS. 9A and 9B show that principal components are actually theeigenvectors of the covalent matrix of the original data in the X-Ycoordinate system.

FIG. 9C shows a plot of WOB vs. RPM, as determined for real-time data inan experiment in accordance with the present disclosure, also shown isan optimum zone as determined for the real-time data.

FIG. 9D shows a plot of WOB vs. RPM, for the data of FIG. 9C, after PCAof that data.

FIG. 10 shows how the safety factors affect the optimum zone to form thesafe zone in the optimum zone chart, in accordance with an embodiment ofthe present disclosure.

FIG. 11 shows a centroid in the safety zone of FIG. 10, in accordancewith the present disclosure.

FIG. 12 shows a plot of bit depth, measured depth versus time for theportion of a well under study.

FIG. 13 shows the first 3.5 minutes of depth versus time plot in standone (shallow depth).

FIG. 14 shows the first 3.5 minutes of depth versus time plot in standtwo (intermediate depth).

FIG. 15 shows the first 3.5 minutes of depth versus time plot in standthree (deep depth).

FIG. 16 shows the Torque versus WOB plot for Stand Two Update One whichhelps to obtain the corresponding constants.

FIG. 17 shows the Depth of Cut versus WOB plot for Stand Two Update Onewhich helps to obtain the corresponding constants.

FIG. 18 shows a combined plot of change in ROP divided by Change in Timeversus Time and also ROP and WOB versus Time in order to get the minimumWOB for stand two update one.

FIG. 19 shows the optimum zone plot for stand two update one.

DETAILED DESCRIPTION

The present disclosure enables a driller, drilling an oil well, toassess, during drilling, the appropriateness of the drilling parametersbeing used and to correct these during drilling. The drilling parametersare monitored/measured during drilling and the values of those measuredparameters are used to define an optimum drilling zone in the WOB-RPMspace. The optimum zone is displayed to the user in addition to WOB-RPMdata points. The displayed WOB-RPM data points are obtained bysubjecting the measured parameter values to a principal componentanalysis in order to obtain only the most significant WOB-RPM datapoints, which are the ones displayed. The principle component analysisessentially filters out less important data, which in turn provides thedriller better insight into the drilling process and the best drillingparameters to use.

Abbreviations

Abbreviations used throughout the present disclosure include:

-   -   ANN Artificial Neural Network    -   BHA Bottom Hole Assembly    -   LWD Logging While Drilling    -   MSE Mechanical Specific Energy    -   MWD Measurement-While-Drilling    -   NPT Non-productive Time    -   PCA Principal Component Analysis    -   PDC Polycrystalline Diamond Compact    -   PWD Pressure-While-Drilling    -   ROP Rate of Penetration    -   RPM Revolutions per Minute    -   WOB Weight on Bit    -   TOR Torque    -   DOC Depth of Cut    -   QRA Quantitative Risk Analysis

The Concept of Machine Learning

Machine learning gives computers the ability to optimize performancecriterion based on sample data or past knowledge. The goal of machinelearning is to identify and reveal hidden patterns linked with the databeing analyzed. The world today is circled with applications of machinelearning. A perfect example is the use of Google™ search which learns todisplay the best results. Another example is the anti-spam softwarewhich filters email messages.

As shown in FIG. 1, there are two major types of machine learning. Firstis supervised (predictive) learning where for a given input variables(x) and output variables (Y), one can use an algorithm to learn themapping function from the input to the output: Y=f(x). The goal is toapproximate the mapping function so well that when there is a new inputdata (x), accurate predictions can be made to obtain the outputvariables (Y) for that data.

Unsupervised (descriptive) learning is the second major type of machinelearning. Unsupervised learning is where for a given input data (x)there are no corresponding output variables. The concept behindunsupervised learning is identify the underlying pattern in the data inorder to learn more about the data.

How Machine Learning is Utilized for Vibration Problems

WOB and RPM causing whirling and stick slip can be predetermined if thetotal drilling conditions are known (Wu et al 2010). A boundarycondition for stable drilling can be obtained in a plot with WOB on theY axis and RPM on the X axis, as shown in FIG. 2. This means if thedriller maintains the drilling parameters such as to keep the bit in theoptimum zone, then drilling will be stable depending on the bit andmechanical properties of the rock.

The boundaries of the optimum zone help determine the best combinationof WOB and RPM for optimum ROP. The hard question to answer is if thestick slip and whirling zone is predicted accurately.

In order to identify the optimum zone effectively, an exemplaryembodiment of a method, in accordance with the present disclosure, isshown in FIG. 3A. This method is adopted to ensure that all themonitored/measured drilling parameters have an impact on the optimumzone. The method represented at FIG. 3A uses available real-time data100 obtained from a drilling rig 102. The exemplary method performs avariable transformation and reduction (e.g., at steps 104, 106, 108,110, 112, 114), and then utilizes machine learning algorithms toidentify the optimum drilling parameter zone and display it to thedriller.

FIG. 3B shows a flowchart of an embodiment of a method in accordancewith the present disclosure. The method of FIG. 3B has drilling—into theEarth—being carried out, at action 300. As the drilling is carried out,Measured Depth, Drilling Time, Bit Depth, WOB, ROP, RPM and TOR areobtained (e.g., measured or determined), in real-time, at action 302.All these can be referred to as surface parameters in that they can beobtained as the drilling progresses, in real-time, without requiringphysical access to the bottom hole assembly. In addition to MeasuredDepth, Drilling Time, Bit Depth, WOB, ROP, RPM and TOR, any otherparameter that can be measured in real-time is to be considered withinthe scope of the present disclosure. For example, MSE can also bemeasured. At action 304, the real-time data is processed, in accordancewith pre-determined rules, in order to obtain a classification schemefor the real-time data. The classification scheme defines an optimumdrilling parameter zone. As will be described further below, thepre-determined rules produce upper and lower limits for the WOB and forthe RPM. These rules are based accepted practices in the art ofdrilling.

As will be understood by the skilled worker, the measured depth is thelength of the path of the drill string, including the bends. The bitdepth is the same as the measured depth during drilling. When drillingstops, the bit depth will be less when pulled up from the bottom of thewell being drilled.

At action 305, a principal component analysis (PCA) of the real-timedata is performed to obtain a set of principle components associated tothe real-time data. Subsequently, at action 307, a subset of theprincipal components is selected. For example, only the principalcomponents that account for 99% (or any other suitable percentage) ofthe data points can be selected to be part of the subset. At action 309,using only the subset of principal components, an inverse PCA isperformed to obtain a modified data, which no longer includes theoriginal real-time data related to the principal components that werenot identified as important (for example, the principal components thataccounted for the remaining 1% of the data points).

At action 311, the modified data is classified in accordance with theclassification scheme obtained at 304, to obtain classified modifieddata, which is then compared, at action 313, to the optimum drillingparameter zone. This results in a comparison result on which anadjustment of the WOB and/or the RPM can be effected, at action 315.Visualization of the data points in the optimum zone chart will show thedriller which zones have most of the data points. Regardless of whetherthere are data points in the optimum zone or not, the upper and thelower limits of RPM and WOB are the boundaries within which the drillercan run the operations with.

Subsequently, after waiting for a pre-determined amount of time ataction 317 (for example, 3.5 minutes or any other suitable timeduration), the method loops back to action 304 where the classificationscheme is defined (re-defined) in accordance with real-time dataacquired since the definition of the previous classification scheme. Aswill be understood by the skilled worker, this re-defines the optimumdrilling parameter zone. In addition to looping back to action 304, themethod also loops back to action 305 where a PCA is performed on inaccordance with real-time data acquired since the previous PCA.

As will be understood by the skilled worker, the aforementionedcomparison can be automated through any conventional means. Theautomated process can include the step of identifying data points thathave values comprised within the optimum zone, compare those points tothe current WOB and RPM settings, and automatically adjust thosesettings so that they correspond to one of the data points identified asbeing within the optimum zone.

In other embodiments, as will be detailed further below, a safe zonewithin the optimum zone can be determined by quantitative risk analysis(QRA) and the comparison action can entail comparing post-PCA datacomprised within the safe zone with the current settings of WOB and RPM,and automatically adjust those settings so that they correspond to oneof the data points identified as being within the optimum zone.

In further embodiments, and as will be detailed further below, acentroid of the post-PCA data points that are within the safe zone, orwithin the optimum zone, can be calculated by, for example, a clusteringoperation, and the current settings of the WOB and RPM can be comparedto the WOB and RPM values of the centroid. The drilling WOB and RPMsettings can automatically be set to the WOB and RPM values of thecentroid if they differ from those values.

In instances where the process is not automated, the driller in chargeof the drilling operation can be provided with a display showing a plotof the WOP versus RPM post-PCA data and the optimum zone (for an exampleof such a plot, see FIG. 9D further below) and, based on the displayeddata, the driller can set the WOB and the RPM to any suitable valuefound in the optimum zone. Similarly, the driller can be provided with adisplay showing a plot of the WOP versus RPM post-PCA data and the safezone and, based on the displayed data, the driller can set the WOB andthe RPM to any suitable value found in the safe some. Further, thedriller can be provided with a display showing the aforementionedcentroid and, based on the WOB and RPM values of the centroid, thedriller can set the drilling parameters to those values.

Classification Scheme

The following relates to action 302 in FIG. 3B.

Classification is a kind of arrangement where like data are classedtogether and separated from unlike data; the main reasons behindclassification is to (a) put knowledge in shape and storage, (b) dostructural analysis of the data being stored; and (c) figure out therelationship existing among different parts of the structure found(Mirkin 1996).

A decision tree classification is used, as an example in the presentdisclosure. Decision trees are based on algorithms which split data intobranches. Unlike a tree where the root is at the bottom, a decision treehas its root node at the apex of the tree (Ville et al 2013). The basisfor building the decision tree is echoed in this root node: the name ofthe field of data and the arrangement of the values that are containedin that field.

There are 3 types of nodes in a decision tree:

-   -   Decision nodes;    -   Chance nodes;    -   Leaf or terminal or end nodes (Bloomsbury Publishing 2013).

In each internal node of the tree reflects certain characteristics ofthe system, and each leaf node represents a class label. There are 3steps to contrasting the decision tree:

-   -   Step 1: At the root of the tree, place the most defining feature        of the dataset    -   Step 2: The training set is then split into subsets with values        corresponding to their respective attributes.    -   Step 3: Redo step 1 and step 2 on each subset till there are        terminal nodes in all the branches of the tree.

In the generic classification tree in FIG. 3C, there are four keyvalues: the upper limit of WOB, the lower limit of WOB, the upper limitof RPM and the lower limit of RPM. These values represent the boundariesfor stick slip, forward whirling, backward whirling and low ROP zonesrespectively. These values change for each stand on a 3.5 minutes basis.

Obtaining the Upper and Lower Limits of RPM and WOB Upper Limit of RPM

Conventionally, the upper limit of RPM is calculated by firstdetermining the mean RPM value and then increasing that value by 10%three times. See FIG. 4.

Increasing the average RPM by 10% three times means

RPM_(upper)=(1.1)³(Mean RPM)=1.331(Mean RPM)

After several iterations with field data, the need to further reducethis value arose, hence a new formula for the upper limit of RPM.

RPM_(upper)=1.331*mean(RPM)−((0.95*mean(RPM))/3))

Lower Limit of RPM

The lower limit of RPM (RPM lower) can be obtained by first finding theminimum depth of cut, which can be obtained based on equation below,which was derived from the mechanical specific energy (MSE) equationintroduced by Teale (Teale 1965).

B ₂*WOB⁴+2B ₁ B ₂*WOB³+(B ₁ ²+2B ₂ B ₀−2πA ₁ B ₂)*WOB²+(2B ₁ B ₀−4πA ₀ B₂)*WOB+B ₀ ²+2A ₁ B ₀−2πA ₀ B ₁)=0

Four values of WOB would be gotten from this quartic equation, only thepositive value has physical meaning. The positive value of WOB can beplugged into the known equation for depth of cut to obtain the optimumdepth of cut. The constants in the equation above can be calculated fromtheir source equations below (Hamrick 2011).

Depth of Cut=DOC=g(WOB)=B ₂*WOB² +B ₁*WOB+B ₀

Torque=f(WOB)=A ₀ +A ₁*WOB

By plotting a chart of incoming torque, depth of cut and WOB data, theconstants A and B can be calculated. The minimum depth of cut would thenbe 50% of the optimum depth of cut. Just by unit conversion using ROP,the minimum RPM can be calculated.

$({DOC})_{\min} = \frac{({DOC})_{opt}}{2}$$({RPM})_{\min} = \frac{({ROP})_{avg}}{({DOC})_{\min}}$

Upper Limit WOB

The upper limit of WOB is determined based on stick slip index. It isexpected that the optimum zone chart would be updated every 3.5 minutesor 210 seconds. The stick slip index would be calculated every 20seconds. This makes 10 test of stick slip index within each update ofthe optimum zone.

${{Stick}\mspace{14mu} {Slip}\mspace{14mu} {Index}} = {\frac{\left( {{Torque}_{\max} - {Torque}_{\min}} \right)}{{Torque}_{avg}}\%}$

Based on that calculation, the severity of the stick slip calculationcan be estimated which is shown in the table 3 below:

TABLE 1 Vibration Severity Levels Based on Downhole Measurements (AlDushaishi et al 2015) Stick-Slip Lateral Acc Lateral RMS Acc Severity(g's) Severity Level (g's) Severity Level (—) Level  0-15 Normal 0-2.5Normal   0-0.5 Low 15-35 Moderate 0.5-1 Moderate 35+ Severe 2.5+ Severe1+ Severe

The upper limit of WOB can then be derived based on the following rules:

-   -   when one test has stick slip index greater than 0.5, make the        upper limit of WOB equal to the minimum WOB of the test    -   when two or more tests have stick slip index greater than 0.5,        make the upper limit of WOB equal to the least minimum WOB of        all the tests with stick slip index greater than 0.5    -   when all the tests have stick slip index less than 0.5, make        upper limit of WOB equal the maximum WOB of all the tests

Lower Limit WOB

The lower limit of WOB can be based on the hardness of the formationbeing drilled. This is the WOB which corresponds to the time when theslope of the ROP versus time plot becomes constant. This is shown inFIG. 5.

Rules of the Classification Tree to Obtain the Optimum Zone

The optimum zone, and the lower and upper limits for RPM and WOB areshown at FIG. 6. In this figure:

-   -   Zone 1 is the Stick Slip Zone    -   Zone 4 is the Low ROP Zone    -   Zone 5 is the Forward Whirling Zone    -   Zone 3 is the Backward Whirling Zone    -   Zone 2 is the Optimum Zone    -   WOB upper limit is based on stick slip index calculations    -   WOB lower limit is based on formation hardness (ROP change)    -   RPM lower Limit is based on minimum depth of cut calculations    -   RPM upper limit is still based on reversal of conventional        operational processes leading to vibrations

With this knowledge, a decision tree can be formed based on the factthat any data point above the stick slip line is in the stick slip zoneand would most likely be experiencing stick slip, any data point behindthe low ROP line is in the low ROP zone and would be experiencing lessefficient drilling, any data point ahead of the backward whirling linewould be in the backward whirling zone and would be experiencingbackward whirling and finally any data point below the forward whirlingline would be in the forward whirling zone and most likely beexperiencing forward whirling. FIG. 3C, discussed above, is based onFIG. 6.

At every 3.5 minutes or 3 feet interval (or any other suitable timeinterval or distance), the optimum zone cab updated by calculating,based on real-time data obtained at action 302, FIG. 3B, new lower andupper limits for WOB and RPM. All the data points will belong to one ofthe zones.

As will be understood by the skilled worker, the real-time data could beclassified and represented in the same plot as the optimum zone.However, representing all acquired data in in the same plot as theoptimum zone would result in a very dense plot and provide little or noinsight to the driller, when the real-time data is acquired at anyreasonable rate (e.g., 100 data points per second). As such, the presentdisclosure uses a dimensionality reduction technique to obtain amodified data set that has considerably less data point.

After dimensionality reduction, the driller can see how much of the datapoints are in stick slip or whirling. Based on the arrangement, thedriller can either select the readings of the data points in the optimumzone or ask the system to generate a range of data points that are inthe optimum zone. However, if there is a significant change in drillingparameters, the optimum zone will shift its location and new safe rangeswould have to be generated. This will be discussed further below inrelation to FIGS. 9C and 9D.

Principal Component Analysis (PCA)

In an example provided in the present disclosure, PCA is used to form alean data set that best represents the drilling process. A summary ofPCA is provided below.

PCA can be used for searching out veiled patterns in high dimension data(i.e., where the number of features exceed the number of observation).In this research, PCA is used for reducing the dimension of the inputdata without losing important information in the original data (Lindsay2002). Three steps govern the PCA process.

The first step is to determine the covariance of the matrix. Covarianceis the measure how two different variables relate with each other duringchanges in values. The formula for covariance is an adjustment of thevariance formula which only analysis the dataset in one variable.

${Variance} = {\sigma^{2} = \frac{\sum\left( {x - \mu} \right)^{2}}{N}}$

For the variable x, μ is the mean and N is quantity of data points invariable x. This formula is then modified the give the formula forcovariance between two variables. Consider two variables x and y

${Covariance} = {{{cov}\left( {x,y} \right)} = \frac{\sum\limits_{i = 1}^{n}{\left( {x_{i} - \overset{\_}{x}} \right)\left( {y_{i} - \overset{\_}{y}} \right)}}{n - 1}}$

If multiple variables are involved, the covariance matrix will besymmetrical; meaning the transpose of the matrix will be the same as theoriginal matrix. Assuming there are four variables, w, x, y and z. Thecovariance matrix will be as follows:

$C = \begin{pmatrix}{{cov}\left( {w,w} \right)} & {{cov}\left( {w,x} \right)} & {{cov}\left( {w,y} \right)} & {{cov}\left( {w,z} \right)} \\{{cov}\left( {x,w} \right)} & {{cov}\left( {x,x} \right)} & {{cov}\left( {x,y} \right)} & {{cov}\left( {x,z} \right)} \\{{cov}\left( {y,w} \right)} & {{cov}\left( {y,x} \right)} & {{cov}\left( {y,y} \right)} & {{cov}\left( {y,z} \right)} \\{{cov}\left( {z,w} \right)} & {{cov}\left( {z,x} \right)} & {{cov}\left( {z,y} \right)} & {{cov}\left( {z,z} \right)}\end{pmatrix}$

Note that the diagonal are the variances of each variable.

Next would be to estimate the eigenvalues and eigenvectors of thecovariance matrix. Let A be an n×n matrix. The number λ is an eigenvalueof A if there exist a non-zero vector v, such that Av=λv The eigenvalues of A are the roots of the characteristic polynomial

${{p(\lambda)} = {\det \left( {A - {\lambda \; I}} \right)}};{{{where}\mspace{14mu} I\mspace{14mu} {is}\mspace{14mu} {the}\mspace{14mu} {identity}\mspace{14mu} {{matrix}.I}} = {{\begin{pmatrix}1 & 0 & 0 \\0 & 1 & 0 \\0 & 0 & 1\end{pmatrix}\mspace{14mu} {or}\mspace{14mu} I} = \begin{pmatrix}1 & 0 \\0 & 1\end{pmatrix}}}$

For each eigenvalue λ, the corresponding eigenvectors are

$v = \begin{bmatrix}v_{1} \\v_{2} \\: \\. \\v_{n}\end{bmatrix}$

obtained by solving the linear system (A−λI)v=0

The principal components are the eigenvectors. The principal componentsare ranked according to their corresponding eigenvalues. If thecharacteristic polynomial of A has 4 as its highest power then therewould be 4 eigenvalues. The highest eigenvalue would produce the firstprincipal component; the second highest eigenvalue would produce thesecond principal component (eigenvector).

In FIG. 7, the data is first plotted on X and Y coordinates. Theprincipal direction is where the highest variance lies. In this case,the U direction is the principal direction with the highest importance.The V direction must be orthogonal to the U direction. It is expectedthat when X and Y coordinates are transformed into U and V coordinates,the covariance between X and Y variables becomes zero. U and V variablesare called principal components (Gillies et al). In reality, they arethe eigenvectors of the covariance matrix of the original dataset. Thelevel of importance is based on the eigenvalues; the eigenvector withthe highest eigenvalue is the most significant and is termed the firstprincipal component. The eigenvector orthogonal to the first principalcomponent with the next highest eigenvalue is the second principalcomponent and so on (Gillies et al). The reduction aspect is done afterthe original dataset has been transformed to principal components.Before inverse PCA is done to get the original variables, somedimensions are zeroed out which have low eigenvalues. The resultingoriginal dataset is leaner and very distinct on what values are to beused as shown in FIG. 8.

Let's assume that the drilling parameters inputted into PCA are WOB,RPM, TOR, ROP or any other drilling parameter desired to have an impacton the optimum zone, for example, MSE. If we represent their values byx₁, x₂, . . . , x_(k):

From k original variables: x₁, x₂, . . . , x_(k): PCA aims to produce knew variables: y₁, y₂, . . . , y_(k): where

$\begin{matrix}{y_{1} = {{a_{11}x_{1}} + {a_{12}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{1k}}}x_{k}}}} \\{y_{2} = {{a_{21}x_{1}} + {a_{22}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{2k}}}x_{k}}}} \\\cdots \\{y_{k} = {{a_{k\; 1}x_{1}} + {a_{k\; 2}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{kk}}}x_{k}}}}\end{matrix}$

yk's are uncorrelated (orthogonal)y₁ explains as much as possible of original variance in data sety₂ explains as much as possible of remaining variance{a₁₁, a₁₂, . . . , a_(1k)} is 1st Eigenvector, λ₁{a₂₁, a₂₂, . . . , a_(2k)} is 2nd Eigenvector, λ₂

FIGS. 9A and 9B simply refreshes the understanding of how principalcomponents relate to each other in PCA. λ₁ & λ₂ are the eigenvectors ofthe correlation/covariance matrix and λ₁ & λ₂ are the coefficients ofthe principal components. If y₁ and y₂ explains 99% of original data,{a₃₁, a₃₂, . . . , a_(3k)} up to {a_(k1), a_(k2), . . . , a_(kk)} areequated to zero. Therefore

$\begin{matrix}{y_{1} = {{a_{11}x_{1}} + {a_{12}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{1k}}}x_{k}}}} \\{y_{2} = {{a_{21}x_{1}} + {a_{22}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{2k}}}x_{k}}}} \\{y_{3} = {{a_{3\; 1}x_{1}} + {a_{3\; 2}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{3\; k}}}x_{k}}}} \\{y_{4} = {{a_{4\; 1}x_{1}} + {a_{4\; 2}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{4\; k}}}x_{k}}}} \\{y_{5} = {{a_{5\; 1}x_{1}} + {a_{5\; 2}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{5\; k}}}x_{k}}}} \\\cdots \\{y_{k} = {{a_{k\; 1}x_{1}} + {a_{k\; 2}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{k\; k}}}x_{k}}}}\end{matrix}$ becomes $\begin{matrix}{y_{1} = {{a_{11}x_{1}} + {a_{12}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{1k}}}x_{k}}}} \\{y_{2} = {{a_{21}x_{1}} + {a_{22}x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; a_{2k}}}x_{k}}}} \\{y_{3} = {{(0)x_{1}} + {(0)x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; (0)}}x_{k}}}} \\{y_{4} = {{(0)x_{1}} + {(0)x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; (0)}}x_{k}}}} \\{y_{5} = {{(0)x_{1}} + {(0)x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; (0)}}x_{k}}}} \\\cdots \\{y_{k} = {{(0)x_{1}} + {(0)x_{2}} + \; {{.\;.\;.\mspace{14mu} {+ \; (0)}}x_{k}}}}\end{matrix}$

Based on the new values of y₃ . . . y_(k), inverse PCA is performed toproduce new set of x₁, x₂, . . . , x_(k). At this point, the reductionhas already happened.

FIG. 9C shows real-time, WOB vs. RPM data points and the optimum zone(rectangle) determined in accordance with the real-time data. FIG. 9Dshows, on an expanded scale, the PCA data calculated based on thereal-time data of FIG. 9C, and the optimum zone. These FIGS. 9C and 9D)are the result of a field test conducted on a well in the continentalUnites States. In FIG. 9C, there are data points in every zone eventhough more dominant in the stick slip and forward whirling zones. AfterPCA, FIG. 9D, there is a clear definition of where the data points lie.Most of the points are in the stick slip zone while the forward whirlingzone has more data points than the optimum zone.

Safe Zone within the Optimum Zone

The concept of the safe zone is to account for the risk of having datapoints lie in the optimum zone when they should actually outside theoptimum zone, in vibration prone zone. The following process takes noteof this risk.

For the stick slip zone, a safety factor is obtained and is subtractedfrom the upper limit of the WOB, while for the forward whirling zone,the corresponding safety factor is added to the lower limit of WOB. Forthe backward whirling zone, the corresponding the safety factor issubtracted from the upper limit of RPM. The safety factor can beobtained through quantitative risk analysis.

Quantitative Risk Analysis (QRA)

QRA has been used widely in the construction industries and has alsobeen used in casing design and well planning by the oil and gasindustries. The QRA approach considers the uncertainty of each inputvariable and provides comprehensive statistical properties of WOB, RPM,ROP, MSE, TOR and other drilling parameters. The parameters needed forquantitatively calculating the risks are discussed generally below.

A mean value, m, is the expected value or the weighted average of anumber N of data points x.

$m = \frac{\sum x}{N}$

Standard deviation, s, is a measure of dispersion or variability.Standard deviation measures the closeness of each random variable to themean value (Liang 2002). It is given as

$s = \sqrt{\frac{\sum\left( {x_{i} - m} \right)^{2}}{N}}$

Coefficient of Variance (COV) evaluates the distribution of the standarddeviation over the mean value (Liang 2002) The data is more uncertain asthe COV goes higher.

${COV} = \frac{s}{m}$

To calculate the risk of data points in the optimum zone fall into thevibration prone zones, there is a need to first determine the means andstandard deviations of the stick slip zone (M_(SS) and S_(SS)), thebackward whirling zone (M_(BW) and S_(BW)), the forward whirling zone(M_(FW) and S_(FW)) and the optimum zone (M_(OP) and S_(OP)).

-   -   For normally distributed stick slip and optimum zone data, the        margin between the two probability density functions (PDFs) has        a mean margin of

M _(SO) =M _(SS) −M _(OP)

And standard deviation margin of

S _(SO)=√{square root over ((S _(SS))²+(S _(OP))²)}

The risk of having optimum zone data points in stick slip

${{zone} = {R_{SO} = \left( \frac{M_{SO}}{S_{SO}} \right)}};$

-   -   In order to give the driller some more space to change        parameters, 20% of the risk can be allowed

Therefore,

${R_{SO} = {80\% \mspace{14mu} \left( \frac{M_{SO}}{S_{SO}} \right)}};$

this is the safety factor for the stick slip zone.

-   -   For normally distributed optimum zone and forward whirling data,        the margin between the two probability density functions (PDEs)        has a mean margin of

M _(OF) =M _(OP) −M _(FW)

And standard deviation margin of

S _(OF)=√{square root over ((S _(OP))²+(S _(FW))²)}

The risk of having forward whirling zone data points in optimum

${{zone} = {R_{OF} = \left( \frac{M_{OF}}{S_{OF}} \right)}};$

-   -   In order to give the driller some more space to change        parameters, can take 20% of the risk can be allowed

Therefore,

${R_{OF} = {80\% \mspace{14mu} \left( \frac{M_{OF}}{S_{OF}} \right)}};$

this is the safety factor for the forward whirling zone.

-   -   For normally distributed backward whirling and optimum zone        data, the margin between the two probability density functions        (PDEs) has a mean margin of

M _(BO) =M _(BW) −M _(OP)

And standard deviation margin of

S _(BO)=√{square root over ((S _(BW))²+(S _(OP))²)}

The risk of having optimum zone data points in backward whirling

${{zone} = {R_{BO} = \left( \frac{M_{BO}}{S_{BO}} \right)}};$

-   -   In order to give the driller some more space to change        parameters, 20% of the risk can be allowed

Therefore,

${R_{BO} = {80\% \mspace{14mu} \left( \frac{M_{BO}}{S_{BO}} \right)}};$

this is the safety factor for the backward whirling zone.

FIG. 10 shows a safety zone (safe zone) within the optimum zone of FIG.6. The safety factor is calculated based on the real-time data, not ondata obtained post PCA.

Clustering and Centroid of Optimum Zone

Clustering is a process forming groups whose objects are somewhatsimilar. A cluster is grouping of objects which are alike and differentfrom objects in other clusters. K-means clustering is a known type ofclustering used, as an example, in the present disclosure. Widely usedin data mining, K-means algorithm is a type of clustering analysis basedon partitioning. The centre of each cluster represents the cluster asthe algorithm ensures convergence towards stable centroids of clusters.The centroid is the centre or mean point, of the cluster. K is thenumber of clusters. After initialization, there are 3 steps in theK-means process.

Initialization: set seed points (randomly)

-   -   Step 1: Each object (compressed data point) is placed in a        cluster of the nearest seed point (centroid) measured with a        specific distance metric (Euclidean distance)    -   Step 2: Estimate new centroid for each cluster in the current        partitioning    -   Step 3: Repeat Step 1; continue iterating until there are no        more changes in membership in each cluster.

A centroid obtained from Kmeans Clustering (or any other suitablemethod) can be used to obtain the recommended WOB and RPM values of thesafe zone which the driller can operate with when there are vibrationissues. The centroid of the safe zone is shown in FIG. 11. The centroidin FIG. 11 is obtained by clustering the data points in the optimumzone. If the optimum zone has no data points, the centroid would bebased on the polygon formed by the upper and lower limits of WOB andRPM. Referring now to FIG. 9D above, the centroid there was determinedby clustering the post-PCA data points in the optimum zone.

Example

In the following example, the data is drawn from a well in WesternCanada. The results presented here are the outcome of each step in themachine learning process. The first set of results relate to PCA done onall the field data fed to the system. The principal components and theirrespective percentage of significance are derived. The principalcomponents that make up at least 99% of the data were chosen while theother principal components are zeroed out before an inverse PCA isperformed to obtain the leaner original data. Based on the decision treeclassification, each data point is then classified into one of the fivezones in the WOB and RPM plot. The quantitative risk analysis resultsare shown and then applied to the optimum zone chart to produce the safezone plot.

This analysis was done on the first 3.5 minutes of three stands of drillstring (that is the first 3 updates of three stands). For this well, adepth of 3.5 feet is drilled in 3.5 minutes. For this post analysis, theentire data for the region for the selected stand would be analysed forvibration issues and classified into the five zones. The stand chosen isone with no obvious issues. The visible signs of problems with the datafrom a stand are inequalities between the bit depth and the measureddepth. It is the bit depth that is very important; it tells that thedrill string is moving into the formation and not just rotating at aspot. Any stand that has a constant depth for a while is an indicationof stoppage in drilling or pause in drilling forward. FIG. 12 shows theplot of bit depth, measured depth versus time for the portion of thewell being studied.

Results

FIGS. 13 to 15 show the first 3.5 minutes of the three stands. Each 3.5minutes of each stand is called the first update of that stand. Usuallyeach stand would have an average of 5 updates. Results from Stand 2Update 1 are the focus of this example.

RPM_(upper) Calculations

The upper limit of RPM was calculated in accordance with the detailsprovided further above.

-   -   For stand one, RPM_(upper)=58.4993 rpm    -   For stand two, RPM_(upper)=59.8457 rpm    -   For stand three, RPM_(upper)=30.4300 rpm

RPM_(min) (Rev/Min) Calculations

In order to find the constants for the depth of cut and torquesequations, graphs of torque versus WOB and depth of cut versus WOB wereplotted and the constants were obtained for the first update from standtwo.

The value for the constants in the Torque equation are shown in thetable 2 below are obtained from FIG. 16, the Torque versus WOB plot.

TABLE 2 Constants Obtained from the Torque Equation Constants fromTorque = f(WOB) = A₀ + A₁ * WOB Data Source A₀ A₁ Stand Two Update One3.7345 0.5447

The value for the constants in the Depth of Cut equation are shown inthe table 3 below are from FIG. 17, Depth of Cut versus WOB plot.

TABLE 3 Constants Obtined from the Depth of Cut Equation Constants fromDepth of Cut = DOC = g(WOB) = B₂ * WOB² + B₁ * WOB + B₀ Data Source B₂B₁ B₀ Stand Two Update One 0.0002 0.0049 0.0015

The constants from the Torque and Depth of Cut equations are nowsubstituted to find the WOB_(opt), DOC_(opt) which will then be combinedwith the ROP_(avg) to find RPM_(min). Four solutions will always begotten from the WOB_(opt) equation, only the positive value has aphysical meaning and only that value would be used in the DOC_(opt)equation.

B ₂*WOB_(opt) ⁴+2B ₁ B ₂*WOB_(opt) ³+(B ₁ ²+2B ₂ B ₀−2πA ₁ B₂)*WOB_(opt) ²+(2B ₁ B ₀−4πA ₀ B ₂)*WOB_(opt)+(B ₀ ²+2A ₁ B ₀−2πA ₀ B₁)=0

Depth of Cut=DOC_(opt) =g(WOB)=B ₂*WOB_(opt) ² +B ₁*WOB_(opt) +B ₀

TABLE 4 Calculations Breakdown for Obtaining Minimum RPM ParametersStand Two Update One B₂ * WOB_(opt) ⁴ 0.0002WOB_(opt) ⁴ 2B₁B₂ *0.00000196WOB_(opt) ³ WOB_(opt) ³ (B₁ ² + 2B₂B₀ − −0.000659969WOB_(opt)² 2πA₁B₂) * WOB_(opt) ² (2B₁B₀ − −0.0093723392WOB_(opt) 4πA₀B₂) *WOB_(opt) (B₀ ² + 2A₁B₀ − −0.1133548802 2πA₀B₁) WOB_(opt)5.513049145597762 solution 1 WOB_(opt) −0.4938393454168616 + solution 2i * 4.735475187016882 WOB_(opt) −0.4938393454168616 − solution 3 i *4.735475187016882 WOB_(opt) −4.535170454764039 solution 4 Relevant5.513049145597762 WOB_(opt) DOC_(opt) 0.0345926827 DOC_(min)0.0172963414 ROP_(avg) 47.0425 RPM_(min) 2719.794834762 (rev/hr)RPM_(min) 45.3299139127 (rev/min)

WOB_(upper) Calculations

The stick slip index is used to find the upper limit of WOB. For standtwo update one, there are ten test conducted and the results are asfollows

TABLE 5 Results of Stick Slip Index Calculations Test Stick Slip Index 10.3467 2 0.1934 3 0.1506 4 0.1559 5 0.1236 6 0.1232 7 0.0936 8 0.7406 90.2577 10 0.2684

Based on the rules mentioned further above, test 8 shows potentials forstick slip since the index is above 0.5. Therefore, the upper limit ofWOB would be the minimum WOB in test 8. The minimum WOB in test 8 is 2.2kDaN. Therefore WOB_(upper)=2.2 kDaN.

WOB_(min) Calculations

WOB lower (WOB min) is achieved by taking the slope of ROP versus timeevery 5 seconds for the entire update leading to 43 runs of slopecalculations. The change in ROP versus time plot is fairly constantafter the point chosen as where constant change begins. Ideally, thechange in ROP versus time should remain constant but in reality, thechange keeps dropping. So the point chosen would be the highest changein ROP before a consistent drop in change in ROP. The closest highestpeak after this peak can be referred to as the Founder Point (that topicis not the focal point of this disclosure). From FIG. 18, theWOB_(min)=1.8 kDaN

The Optimum Zone Chart

A combination of the upper and lower limits for WOB and RPM form the boxthat makeup the optimum zone plot, FIG. 19. The lack of data points inthe optimum zone for this particular update (stand two update one) isthe reason why all the safe factors are zero for this case. In thisFigure, the dotted lines are the data points. The RPM is constant basedon feed data. The start and end is an indication of when ROP startsoccurring so the reader can see what is happening in relation with theoptimum zone till the ROP comes to the last data point at the end.

In the preceding description, for purposes of explanation, numerousdetails are set forth in order to provide a thorough understanding ofthe embodiments. However, it will be apparent to one skilled in the artthat these specific details are not required. In other instances,well-known electrical structures and circuits are shown in block diagramform in order not to obscure the understanding. For example, specificdetails are not provided as to whether the embodiments described hereinare implemented as a software routine, hardware circuit, firmware, or acombination thereof.

Embodiments of the disclosure can be represented as a computer programproduct stored in a machine-readable medium (also referred to as acomputer-readable medium, a processor-readable medium, or a computerusable medium having a computer-readable program code embodied therein).The machine-readable medium can be any suitable tangible, non-transitorymedium, including magnetic, optical, or electrical storage mediumincluding a diskette, compact disk read only memory (CD-ROM), memorydevice (volatile or non-volatile), or similar storage mechanism. Themachine-readable medium can contain various sets of instructions, codesequences, configuration information, or other data, which, whenexecuted, cause a processor to perform steps in a method according to anembodiment of the disclosure. Those of ordinary skill in the art willappreciate that other instructions and operations necessary to implementthe described implementations can also be stored on the machine-readablemedium. The instructions stored on the machine-readable medium can beexecuted by a processor or other suitable processing device, and caninterface with circuitry to perform the described tasks.

The above-described embodiments are intended to be examples only.Alterations, modifications and variations can be effected to theparticular embodiments by those of skill in the art. The scope of theclaims should not be limited by the particular embodiments set forthherein, but should be construed in a manner consistent with thespecification as a whole.

As detailed above, the present disclosure enables a driller to assess,during drilling, the appropriateness of the drilling parameters beingused and to correct these during drilling. The drilling parameters aremonitored/measured during drilling and the values of those measuredparameters are used to define an optimum drilling zone in the WOB-RPMspace. The optimum zone is displayed to the user in addition to WOB-RPMdata points. The displayed WOB-RPM data points are obtained bysubjecting the measured parameter values to a principal componentanalysis in order to obtain only the most significant WOB-RPM datapoints, which are the ones displayed. The principle component analysisessentially filters out less important data, which in turn provides thedriller better insight into the drilling process and the best drillingparameters to use. In some embodiments, the method described can beautomated.

REFERENCES

-   1. Al Dushaishi M., Nygaard R., Hoel E., Andersen E., & Hellvik S.    (May 2015). Post Well Vibration Analysis in the North Sea: A Tool to    Understand Drilling Performance. ASME 2015 34th International    Conference on Ocean, Offshore and Arctic Engineering.-   2. Alvarado, V., Ranson, A., Hernandez, K., Manrique, E., Matheus,    J., Liscano, T., and Prosperi, N. 2002. Selection of EOR/IOR    Opportunities Based on Machine Learning. European Petroleum    Conference, 29-31 October, Aberdeen, United Kingdom.    https://doi.org/10.2118/78332-MS-   3. Bangert, P. (2017, May 9). Smart Condition Monitoring Using    Machine Learning. Society of Petroleum Engineers.    doi:10.2118/187936-MS-   4. Bloomsbury Publishing. 2013. QFINANCE: The Ultimate Resource.    Bloomsbury Information Ltd, Fourth edition. ISBN-13: 978-1849300629.-   5. Cao, Q., Banerjee, R., Gupta, S., Li J., Zhou, W., and    Jeyachandra, B. 2016. Data Driven Production Forecasting Using    Machine Learning. SPE Argentina Exploration and Production of    Unconventional Resources Symposium, 1-3 June, Buenos Aires,    Argentina. https://doi.org/10.2118/180984-MS-   6. Elshafei, M., Baig, M. M., Mysorewala, M. F., and    Al-Majed, A. A. 2015. Control and Optimization of Directional    Drilling System. SPE Middle East Intelligent Oil and Gas Conference    and Exhibition, 15-16 September, Abu Dhabi, UAE.    https://doi.org/10.2118/176759-MS-   7. Gillies D., Diesenroth M. (DOC493): Intelligent Data Analysis and    Probabilistic Inference Lecture 14. Department of Computing,    Imperial College London. Retrieved from    https://www.doc.ic.ac.uk/˜dfg/ProbabilisticInference/IDAPISlides01.pdf-   8. Hamrick T. R. (2011) Optimization of Operating Parameters for    Minimum Mechanical Specific Energy in Drilling. Retrieved from    https://www.osti.gov/servlets/purl/1060223-   9. JPT Staff. 1998. Detecting Whirling Behavior of the Drill string.    Journal of Petroleum Technology, May.    https://doi.org/10.2118/0598-0064-JPT-   10. Kamata, M., Underhill, W., Meehan, R., and Nutt, L. 1997.    Drill-Bit Seismic A Service For Drilling Optimization. SPWLA 38th    Annual Logging Symposium, 15-18 June, Houston, Tex. SPWLA-1997-DD-   11. Karlsson, H., and Brassfield, T. 1985. Performance Drilling    Optimization. SPE/IADC Drilling Conference, 5-8 March, New Orleans,    La. https://doi.org/10.2118/13474-MS-   12. Liang, Q. J. (2002, Jan. 1). Application of Quantitative Risk    Analysis to Pore Pressure and Fracture Gradient Prediction. Society    of Petroleum Engineers. doi:10.2118/77354-MS-   13. Lindsay, S., 2002. A tutorial on principal component analysis.    Retrieved from    https://www.cs.otago.ac.nz/research/publications/OUCS-2002-12.pdf-   14. Louridas, P., and Ebert, C. 2016. Machine Learning. IEEE    Software, Volume: 33, Issue: 5, September-October 2016,    10.1109/MS.2016.114-   15. Mirkin B. 1996. Mathematical Classification and Clustering.    Kluwer Academic Publishers. ISBN 978-1-4613-0457-9-   16. Paes, P., Aragao A. F. L., Felicissimo R. S., and Chen D.    C-K. 2005. Cost-Effective Drilling Optimization Technologies in    Campos Basin. SPE Latin American and Caribbean Petroleum Engineering    Conference, 20-23 June, Rio de Janeiro, Brazil.    https://doi.org/10.2118/94785-MS-   17. Tansev E. 1975. A Heuristic Approach to Drilling Optimization.    Fall Meeting of the Society of Petroleum Engineers of AIME, 28    September-1 October, Dallas, Tex. https://doi.org/10.2118/5546-MS-   18. Teale, R. 1965. The concept of specific energy in rock drilling.    International Journal of Rock Mechanics and Mining Sciences &    Geomechanics, Abstracts 2 (1): 57-73. doi: ISSN 0148-9062-   19. Torres-Cabrera N., Pozo M., and Finessi A. A. 2017. Drilling    Optimization of Argentina Horizontal Tight Sand Wells. SPE Latin    America and Caribbean Petroleum Engineering Conference, 18-19 May,    Buenos Aires, Argentina. https://doi.org/10.2118/185466-MS-   20. Ville, B., Neville, P. (2013). Decision Trees for Analytics:    Using SAS Enterprise Miner. SAS Institute. ISBN 978-1-61290-252-4.-   21. Wu, S. X., Paez, L., Partin, U., and Agnihotri, M. 2010.    Decoupling Stick-slip and Whirl to Achieve Breakthrough in Drilling    Performance. IADC/SPE Drilling Conference and Exhibition.    https://doi.org/10.2118/128767-MS-   22. Zhang, Q., Jiarong, S., 1991. The Application of Machine    Learning to Rock Mechanics. 7th ISRM Congress, 16-20 September,    Aachen, Germany. ISRM-7CONGRESS-1991-167

1. A method for producing an oil well, the method comprising: a.drilling into the Earth, the drilling being effected by a drill string,the drill string having a drill bit; b. obtaining real-time data fromthe drill string, the real-time data comprising, measured depth,drilling time, drill bit depth, weight on drill bit (WOB) data,revolution per minute (RPM) data, torque (TOR) data and rate ofpenetration (ROP) data; c. in accordance with the real-time data and inaccordance with pre-determined rules, obtaining a drill string dataclassification scheme, which defines an optimum drilling parameter zone;d. performing a principal component analysis (PCA) of the real-timedata, to obtain a set of principle components associated to thereal-time data; e. selecting a subset of the set of principlecomponents; f. in accordance with the subset of principles components,performing an inverse of the PCA, to obtain modified data; g.classifying the modified data in accordance with the drill string dataclassification scheme, to obtain classified modified data; h. comparingthe classified modified data to the optimum drilling parameter zone, toobtain a comparison result; and i. adjusting at least one of the WOB andthe RPM in accordance with the comparison result.
 2. The method of claim1 further comprising: displaying the classified modified data and theoptimum drilling parameter zone.
 3. The method of claim 1 furthercomprising: performing a quantitative risk analysis (QRA) of thereal-time data to in accordance with the real-time data, to obtain QRAresults; and reducing a size of the optimum drilling parameter zone inaccordance with the QRA results, to obtain a safe drilling parameterzone, wherein comparing the modified data to the optimum drillingparameter zone consists in comparing the modified data to the safedrilling parameter zone.
 4. The method of claim 3 further comprising:determining a centroid of the safe drilling parameter zone, whereincomparing the modified data to the optimum drilling parameter zoneconsists in comparing the modified data to WOB and RPM values of thecentroid.
 5. The method of claim 1, wherein the pre-determined rulesinclude rules for determining a lower WOB limit, an upper WOB limit, alower RPM limit and an upper RPM limit.
 6. The method of claim 5,wherein the rule for determining the upper RPM limit includes: inaccordance with the real-time data: calculating a mean RPM; andincreasing the average RPM by 10% three, three times.
 7. The method ofclaim 6, wherein the rule for determining the upper RPM limit furtherincludes: reducing the value obtained by increasing the average RPM by10% three by 0.95*mean(RPM))/3.
 8. The method of claim 4, wherein therule for determining the lower RPM is based on a determination of amechanical specific energy.
 9. The method of claim 4, wherein the rulefor determining the lower WOB is based on a hardness of a formationbeing drilled.
 10. The method of claim 4, wherein the rule fordetermining the upper WOB is based on a determined stick slip index. 11.The method of claim 1, wherein comparing and adjusting are automatedactions.
 12. The method of claim 1, further comprising: periodicallyrepeating the actions b through i, as the drilling progresses.